package com.siss.tenancy.user.utils;

import java.util.Arrays;

/**
 * tk.mybatis 通用方法名
 * 
 * @author yingw
 * @version 1.0
 */
public enum TKMapperEnum {
	
	INSERT("isert"),
	INSERTSELECTIVE("insertSelective"),
	
	DELETE("delete"),
	DELETEBYPRIMARYKEY("deleteByPrimaryKey"),
	DELETEBYEXAMPLE("deleteByExample"),
	
	UPDATEBYPRIMARYKEY("updateByPrimaryKey"),
	UPDATEBYPRIMARYKEYSELECTIVE("updateByPrimaryKeySelective"),
	UPDATEBYEXAMPLE("updateByExample"),
	UPDATEBYEXAMPLESELECTIVE("updateByExampleSelective");
	
	private String value;
	
	private TKMapperEnum(String value) {
		
		this.value = value;
		
	}

	public static boolean hasValue(String value) {
		
		TKMapperEnum[] values = TKMapperEnum.values();
		
		return Arrays.stream(values).anyMatch((e)->{
			
			return e.value.equals(value);
			
		});
	}
	
	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
	
	
}
